﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Email的验证</title>
    <script type="text/javascript" language="JavaScript">
        function ismail(mail){
            return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(mail));
        }       
        
    </script>
</head>
<body>
<input type=text name="txt1" value="booknew@sina.com">
<input type=button value="测试" onClick="javascript:alert(ismail(txt1.value))">
</body>
</html>